Heterogenous computing systems and devices (e.g., systems that use multiple distinct computing processors based on different instruction set architectures) are used in many computing scenarios. For example, in some devices, a separate CPU and GPU may be situated on the same die. In various systems, the computing processors may be configured to execute instructions based on non-identical instruction set architectures (ISAs). The use of heterogenous processors can provide processing, space, and resources efficiencies. For example, two processors that lie on the same die may each have access to a common memory; this shared memory allows the same data to be easy accessed by both processors.
However, resource sharing can also lead to problems in some heterogenous computing systems. One such problem comes when using program languages that support the use of function pointers, which allow a pointer to a function to be passed as data between threads. These function pointers are not frequently well supported (or supported at all) in traditional systems with heterogenous processors using different ISAs. For example, if a pointer is created to a function that is written in a first ISA for a first processor, that same pointer could end up being passed to a thread running on a second processor. If the second processor attempts to execute the function pointed to by the function pointer, there will usually be an error because the second processor will attempt to execute a function written in an unsupported ISA. Some systems attempt to deal with this by storing two pointers for each function, but this does not work well in all languages, such as, for example, C and C++.